package week6;

public class PC {
    private CPU cpu;
    private HardDisk hardDisk;
    public void setCpu(CPU cpu){
        this.cpu = cpu;
    }
    public void setHardDisk(HardDisk hardDisk){
        this.hardDisk = hardDisk;
    }
    public void show(){
        System.out.println("CPU的速度是:"+cpu.getSpeed());
        System.out.println("hardDisk的容量为:"+hardDisk.getAmount());
    }
}
